<?php 

$cookie_usuarioNB = $_COOKIE['proyecta_nb'];
$usuarioNB = explode('|', base64_decode($cookie_usuarioNB));
if($cookie_usuarioNB==''){
	header('Location: nube.php');
}

require_once 'sipv2/includes/inc_funciones.php';

$sqlAcole_py='';
	$sqlAcole_pers='';
	$sqlAcole_area='';
	
if($usuarioNB[3]=='PRO'){
	switch ($usuarioNB[5]) {
		case 'AdminTI':
		//echo "addd";
			$sqlAcole_py=" select 'proy' as  tp_carpeta ";
			$sqlAcole_pers=" select 'pers' as  tp_carpeta  ";
			$sqlAcole_area=" select 'a' as tp_carpeta ";
			break;
		case 'Gerencia':
			$sqlAcole_py=" select 'proy' as  tp_carpeta ";
			$sqlAcole_pers=" select distinct tp_carpeta FROM nube_carpt_pers where id_pers_acceso='{$usuarioNB[0]}'";
			$sqlAcole_area=" select 'a' as tp_carpeta ";
			break;
		case 'director':
			$sqlAcole_py=" select 'proy' as tp_carpeta ";
			$sqlAcole_pers=" select distinct tp_carpeta FROM nube_carpt_pers where id_pers_acceso='{$usuarioNB[0]}'";
			$sqlAcole_area=" select distinct tp_carpeta FROM nube_carpt_area where id_pers_acceso='{$usuarioNB[0]}'";
			break;
		default:
			 $sqlAcole_py="select distinct tp_carpeta FROM nube_carpt_proy where id_pers_acceso='{$usuarioNB[0]}'";
			 $sqlAcole_pers=" select distinct tp_carpeta FROM nube_carpt_pers where id_pers_acceso='{$usuarioNB[0]}'";
			 $sqlAcole_area=" select distinct tp_carpeta FROM nube_carpt_area where id_pers_acceso='{$usuarioNB[0]}'";
		 break;
	}

}else{
	// si es persona externa 
	$sqlAcole_py="select distinct tp_carpeta FROM nube_carpt_proy where id_pers_acceso='{$usuarioNB[0]}'";
	 $sqlAcole_pers=" select distinct tp_carpeta FROM nube_carpt_pers where id_pers_acceso='{$usuarioNB[0]}'";
	 $sqlAcole_area=" select distinct tp_carpeta FROM nube_carpt_area where id_pers_acceso='{$usuarioNB[0]}'";
}

     $sql="select  * from (
			{$sqlAcole_py}
		union
			{$sqlAcole_pers}
		union
			{$sqlAcole_area}
		
		)tabla ";
$result = fnp_ejecuta_query($sql,'S');


$varr_tp = array("proy" => "Proyecto", "pers" => "Personal", "a" => "Area");




if($nurl !=''){
	$arr_ul=explode('/',$nurl);
	$ncont=count($arr_ul);
	$carpeta_selec=$arr_ul[$ncont-1];
	$nurl=$nurl.'/';
	
}

?>
<!DOCTYPE html>
<html lang='es'>

<head>
	<meta charset='utf-8'>
    
 <script type="text/javascript" src="sipv2/js/jquery-1.8.0.min.js"></script>   
 <script type="text/javascript" src="sipv2/js/general.js"></script>    
  <script type="text/javascript" src="sipv2/js/jquery-1.10.2.js"></script>
  <script type="text/javascript" src="sipv2/js/jquery-ui.js"></script>
 <script type="text/javascript" src="sipv2/js/jquery.confirmacion/jquery.confirmacion.js"></script>
 <script type="text/javascript" src="sipv2/js/jquery.tabla_control/js/tabla_control.js"></script>
 <script type="text/javascript" src="sipv2/js/jquery.nubeGestionFile/jqueryFileTree.js"></script>
 <script type="text/javascript" src="sipv2/js/jquery.nubeGestionFile/tool/file_tree_gestionFile.js"></script>

 
<link rel="stylesheet" href="sipv2/utilitarios/css/dock/css/dock.css">
	<link rel="stylesheet" type="text/css" href="sipv2/utilitarios/css/reset.css">
	<link rel="stylesheet" type="text/css" href="sipv2/utilitarios/css/responsive.css">
	<link rel="stylesheet" type="text/css" href="sipv2/utilitarios/css/general.css">
	<link rel="stylesheet" type="text/css" href="sipv2/utilitarios/css/area_conocimiento.css">
	<link rel="stylesheet" type="text/css" href="sipv2/utilitarios/css/css_popup.css">
    
    <link rel="stylesheet" type="text/css" href="sipv2/js/jquery.tabla_control/css/tabla_control.css">    
    <link rel="stylesheet" type="text/css" href="sipv2/utilitarios/css/dato_proyecto.css">   
    <link rel="stylesheet" type="text/css" href="sipv2/js/jquery.select_multiple/select_multiple.css">    
    <link href="sipv2/js/jquery.nubeGestionFile/jqueryFileTree.css" rel="stylesheet" type="text/css" media="screen" />
  
 <script type="text/javascript" src="sipv2/js/jquery.nubeGestionFile/upload/jquery.upload.js"></script>
 <link rel="stylesheet" type="text/css" href="sipv2/js/jquery.nubeGestionFile/upload/css/upload.css">
 
 
	
<style type="text/css">
	#tlb_lstCp{font-size:11px;}	
	
	#pop_div{z-index:4; position:fixed; background-color:#dedede;
		-moz-box-shadow:2px 1px 8px #666;
		-webkit-box-shadow:2px 1px 8px #666;
		box-shadow:2px 1px 8px #666;
		width:550px; top:50%; left:50%; margin:-330px 0 0 -230px;
	}
	
	#pop_div h1{font:13px/1 'Cuprum','Lucida Sans Unicode', 'Lucida Grande', sans-serif; background:#f5f5f5;
		padding: 18px 25px;
		-moz-text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
		-webkit-text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
		text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
		color:#666;
	}
	
	#pop_div h1{
		letter-spacing:0.3px;
		margin-top: 0px;
		color:#888;
	}

	
	.table_principal_g tr{background:rgb(255,255,255); font-size:10px;}	
	.table_principal_g tbody  tr:hover{background: rgb(219,225,227);}
	
	#pid{margin:5px;}
	
	.interior {
		height: 350px;
		overflow: auto;
	}
	
	#cancela_vpop{font-size:11px; float:right;}
	#guardar_vpop{font-size:11px; float:right;}
	
	.table_principal_g td, .table_principal_g th {
		border: 1px solid #999;
		min-width: 50px;
		max-width: none; 
		float: inherit;
		overflow: hidden;
	}
	/**@Willian Pillaca**/
	#dv_cnlg{
		display: block;
		position: relative;
		right: 2px;
		top: 26%;
		margin-top: 12px;
		min-width: 165px;
		max-width: 215px;
		/*z-index: 1;*/
		padding-bottom: 12px;
		border:1px solid #bdc4c9;
		border-radius: 5px;
		background:rgb(255,255,255);
		font-size:12px;
		
	}
	#usuario_actual{
		margin: 0 auto;
		height: 80px;
		z-index: 2;
	}
	.chat-bubble-arrow {
		border-color: transparent transparent #fff transparent;
		border-style: solid;
		border-width: 9px;
		height: 0;
		width: 0;
		position: absolute;
		top: -17px;
		right: 30px;
	}

	.chat-bubble-arrow-border {
		border-color: transparent transparent #bdc4c9 transparent;
		border-style: solid;
		border-width: 9px;
		height: 0;
		width: 0;
		position: absolute;
		top: -19px;
		right: 30px;
	}
	.lg_itm{ padding:6px; padding-left:20px; padding-right:20px;}


	.bt_sl:hover{background:rgb(226,235,235);}
	
	.item_mail{ width: 80%;

overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;}

.item_espacio{ width: 80%;
	
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
}

	#logo_proyecta{
		width: 400px;
		height: auto;
		float: right;
		padding-top: 20px;
	}
	#datos_usuario{
		float: right;
		width: 250px;
		height: auto;
		margin: 26px 60px 0 0;
	}


	#despliegue ,#despliegue a {
               color:#444;
               font-weight:normal;
                text-decoration:none;
       }

       /*estilos para popup @Autor: Willian Pillaca*/

       #popup {
	left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1001;
}

.content-popup {
	margin:0px auto;
	margin-top:120px;
	position:relative;
	padding:10px;
	width:710px;
	min-height:250px;
	border-radius:4px;
	background-color:#FFFFFF;
	box-shadow: 0 2px 5px #666666;
}

.content-popup h2 {
	color:#48484B;
	border-bottom: 1px solid #48484B;
    margin-top: 0;
    padding-bottom: 4px;
}

.popup-overlay {
	left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 999;
	display:none;
	background-color: #777777;
    cursor: pointer;
    opacity: 0.7;
}

.close {
	position: absolute;
    right: 15px;
}


/**stylos para adjuntar archivos**/
#dragandrophandler
{
border:2px dotted #5c1683;
width:650px;
color:#5c1683;
text-align:center;
vertical-align:middle;
padding:10px 10px 10 10px;
margin-bottom:10px;
font-size:200%;
height: 30px;
}
.progressBar {
    width: 200px;
    height: 22px;
    border: 1px solid #ddd;
    border-radius: 5px; 
    overflow: hidden;
    display:inline-block;
    margin:0px 10px 5px 5px;
    vertical-align:top;
}
 
.progressBar div {
    height: 100%;
    color: #fff;
    text-align: right;
    line-height: 22px; /* same as #progressBar height if we want text middle aligned */
    width: 0;
    background-color: #0ba1b5; border-radius: 3px; 
}
.statusbar
{
    border-top:1px solid #A9CCD1;
    min-height:25px;
    width:700px;
    padding:10px 10px 0px 10px;
    vertical-align:top;
}
.statusbar:nth-child(odd){
    background:#EBEFF0;
}
.filename
{
display:inline-block;
vertical-align:top;
width:250px;
}
.filesize
{
display:inline-block;
vertical-align:top;
color:#30693D;
width:100px;
margin-left:10px;
margin-right:5px;
}
.abort{
    background-color:#A8352F;
    -moz-border-radius:4px;
    -webkit-border-radius:4px;
    border-radius:4px;
    display:inline-block;
    color:#fff;
    font-family:arial;font-size:13px;font-weight:normal;
    padding:4px 15px;
    cursor:pointer;
    vertical-align:top
    }


</style>

<script>
	/**script pára adjuntar archivos
	@Autor: Willian Pillaca
	**/
	
function sendFileToServer(formData,status)
{
	
	
	var ruta_direc = $('#directorio_path').val();
	var vtp = $('#hdm_tp').val();
	var vtps = $('#hdm_tps').val();
	var vtpy = $('#hdm_py').val();		
		
    var uploadURL ="sipv2/includes/inc_procesa_file_upload.php?vtp="+vtp+"&vtps="+vtps+"&vtpy="+vtpy+"&ruta_direc="+ruta_direc; 
    var extraData ={}; //Extra Data.
    var jqXHR=$.ajax({
            xhr: function() {
            var xhrobj = $.ajaxSettings.xhr();
            if (xhrobj.upload) {
                    xhrobj.upload.addEventListener('progress', function(event) {
                        var percent = 0;
                        var position = event.loaded || event.position;
                        var total = event.total;
                        if (event.lengthComputable) {
                            percent = Math.ceil(position / total * 100);
                        }
                        //Set progress
                        status.setProgress(percent);
                    }, false);
                }
            return xhrobj;
        },
    url: uploadURL,
    type: "POST",
    contentType:false,
    processData: false,
    cache: false,
    data: formData,
        success: function(data){
            status.setProgress(100);
 
            $("#status1").append("File upload Done<br>");         
        }
    }); 
 
    status.setAbort(jqXHR);
}
 
var rowCount=0;
function createStatusbar(obj)
{
     rowCount++;
     var row="odd";
     if(rowCount %2 ==0) row ="even";
     this.statusbar = $("<div class='statusbar "+row+"'></div>");
     this.filename = $("<div class='filename'></div>").appendTo(this.statusbar);
     this.size = $("<div class='filesize'></div>").appendTo(this.statusbar);
     this.progressBar = $("<div class='progressBar'><div></div></div>").appendTo(this.statusbar);
     this.abort = $("<div class='abort'>Cancelar</div>").appendTo(this.statusbar);
     obj.after(this.statusbar);
 
    this.setFileNameSize = function(name,size)
    {
        var sizeStr="";
        var sizeKB = size/1024;
        if(parseInt(sizeKB) > 1024)
        {
            var sizeMB = sizeKB/1024;
            sizeStr = sizeMB.toFixed(2)+" MB";
        }
        else
        {
            sizeStr = sizeKB.toFixed(2)+" KB";
        }
 
        this.filename.html(name);
        this.size.html(sizeStr);
    }
    this.setProgress = function(progress)
    {       
        var progressBarWidth =progress*this.progressBar.width()/ 100;  
        this.progressBar.find('div').animate({ width: progressBarWidth }, 10).html(progress + "% ");
        if(parseInt(progress) >= 100)
        {
            this.abort.hide();
        }
    }
    this.setAbort = function(jqxhr)
    {
        var sb = this.statusbar;
        this.abort.click(function()
        {
            jqxhr.abort();
            sb.hide();
        });
    }
}
function handleFileUpload(files,obj)
{
   for (var i = 0; i < files.length; i++) 
   {
        var fd = new FormData();        
        fd.append('file', files[i]);
 
        var status = new createStatusbar(obj); //Using this we can set progress.
        status.setFileNameSize(files[i].name,files[i].size);
        sendFileToServer(fd,status);
 
   }
}
$(document).ready(function()
{
var obj = $("#dragandrophandler");
obj.on('dragenter', function (e) 
{
    e.stopPropagation();
    e.preventDefault();
    $(this).css('border', '2px solid #0B85A1');
});
obj.on('dragover', function (e) 
{
     e.stopPropagation();
     e.preventDefault();
});
obj.on('drop', function (e) 
{
 
     $(this).css('border', '2px dotted #0B85A1');
     e.preventDefault();
     var files = e.originalEvent.dataTransfer.files;
 
     //We need to send dropped files to Server
     handleFileUpload(files,obj);
});
$(document).on('dragenter', function (e) 
{
    e.stopPropagation();
    e.preventDefault();
});
$(document).on('dragover', function (e) 
{
  e.stopPropagation();
  e.preventDefault();
  obj.css('border', '2px dotted #0B85A1');
});
$(document).on('drop', function (e) 
{
    e.stopPropagation();
    e.preventDefault();
});
 
});



</script>



<script type="text/javascript">	
	$(document).ready(function() {  		
		/**levantar popup
		@Autor Willian Pillaca**/

	/*$('#open_popup_upload_file').click(function(){
		$('#popup').fadeIn('slow');
		$('.popup-overlay').fadeIn('slow');
		$('.popup-overlay').height($(window).height());
		return false;
	});*/
	
	$('#close').click(function(){
		$('#popup').fadeOut('slow');
		$('.popup-overlay').fadeOut('slow');
		return false;
	});

	/**fin de levantar popup**/



	   var vurl='<?php echo $nurl;?>';	    
		$('#tree').fileTree({			
			root:'<?php echo $nurl;?>',
			script: 'sipv2/js/jquery.nubeGestionFile/connectors/jqueryFileTree.php',
			folderEvent: 'click',
			filtro: '<?php echo $carpeta_selec?>',
			multiFolder: false
		});
		
		
		$('#formulario').on('click','#cancela_vpop',function(){		
			$("#pop_div").remove();
		});
		
		$('#formulario').on('click','#guardar_vpop',function(){
				myarray = [];
				var fs_actual=$('#fs_actual').val();
				var arraFils = [];
				var vtp = $('#hdm_tp').val();
				var vtps = $('#hdm_tps').val();
				var vtpy = $('#hdm_py').val();
				var cp_s=$('#cp_s').val();
				var direc_s=$('#direc_s').val();			
				
				$('#tlb_lstCp tbody tr input:checkbox').each(function(){
					id = $(this).val(),
					tp_pers = $(this).attr('data-t'),				
					vtr = $(this).closest('tr'),
					accion=$(vtr).find('td:eq(0)').attr('class'),
					cp_acction=$(vtr).find('td:eq(3) select').val();				
	
					if($(this).is(':checked')){
						if(accion=='I'){
							$(vtr).find('td:eq(0)').attr('class','U');						
							arraFils.push($(vtr).index());
						}
						   myarray.push({idpersona:id,tp_pers:tp_pers,cp_acction:cp_acction,accion:accion});
					}else{
						if(accion=='U'){
							$(vtr).find('td:eq(0)').attr('class','I');
							$(vtr).find('td:eq(3) select option:eq(0)').attr('selected','true');
						   myarray.push({idpersona:id,tp_pers:tp_pers,cp_acction:cp_acction,accion:'D'});
						}
					}
				});
	
				json = JSON.stringify(myarray);
					
				$.post('sipv2/includes/inc_funciones.php',{
					option : 'gb_persCp_Files',
					vtp:vtp,
					vtps : vtps,
					vtpy : vtpy,
					cp_s : cp_s,
					direc_s : direc_s,
					parametro : json
				},function(data){
					//console.log(data);			
				});						
		});
		
	
			
			
			$('#salir_upload').on('click',function(){
				desbloquearFondoPantallaUpload('IdPantalla')
				var popupload = $('#popupload');
				popupload.addClass('hidden');
				$('#lista_upload').html('');			
			});
			
			
			$('#adjuntar').click(function(){				
			
				var vtp = $('#hdm_tp').val();
				var vtps = $('#hdm_tps').val();
				var vtpy = $('#hdm_py').val();
				
				
				var vtabla=$('#idtabl').val();
				var vidcampft=$('#idcampft').val();
				var vvisor=$('#hdm_idvisor').val();
				

				if (typeof (vvisor) == "undefined"){
					vvisor='';
				}
				if(vtabla==''){vtabla='upload';}
				if(vidcampft==''){vidcampft='';}
	
				var idtr = $('#idtr').val();

				$.upload({
					urlprocesa : 'sipv2/includes/inc_procesa_nube_upload.php',
					variables : [vtp,vtps,vtpy],
					idElemento : 'file_upload',
					idtabla : vtabla,
					idcampofilt : vidcampft,
					idface : '',
					idcontrato : '',
					idvisor : vvisor,
					repositorio : '../proyecto/',
					repost:path,
					listaArchivo : 'lista_upload',
					triggerUpload : 'upload'
				});
				
				
			});
			
			$('#file').on('click','.borrar',function(){
				var vtp = $('#hdm_tp').val();
				var vtps = $('#hdm_tps').val();
				var vidfil=$(this).closest('li').attr('id');
				var vli=$(this).closest('li');				
				
				if(confirm('¿Estas seguro de eliminar archivo ?')){
					$.post('sipv2/js/jquery.nubeGestionFile/includes/inc_litsfile.php', {
						idfila:vidfil,
						vtp:vtp,
						vtps:vtps,
						acciondb : 'delete_file_upload'
					}, function(data){
						//console.log(data);
						if(data=='1'){
							$(vli).remove();
						}
					});
				}
			});


			$('#salir_papelera').on('click',function(){
				desbloquearFondoPantallaUpload('IdPantalla')
				var popupload = $('#popupreciclaje');
				popupload.addClass('hidden');
				$('#lista_reciclaje').html('');			
			});
			
			/**@Willian Pillaca**/
			$('#dv_act_clg').on('click',function(){
	  		if($("#dv_cnlg").is(':visible')){
				$("#dv_cnlg").addClass('hidden');
			}else{
				$("#dv_cnlg").removeClass('hidden');
			}
	 		 });
		
    });
	
	function abrir_popup(vcp_s,vpath){		
		console.log('vpath->>>');
		console.log(vpath);
		$('#directorio_path').val(vpath);
		console.log('valor asignado');
		console.log($('#directorio_path').val())
		var vtp = $('#hdm_tp').val();
		var vtps = $('#hdm_tps').val();
		var vtpy = $('#hdm_py').val();


		$('#popup').fadeIn('slow');
		$('.popup-overlay').fadeIn('slow');
		$('.popup-overlay').height($(window).height());

		

	}
	
	
	function vent_adjunto(vcp_s,vpath){
				
		var vtp = $('#hdm_tp').val();
		var vtps = $('#hdm_tps').val();
		var vtpy = $('#hdm_py').val();
		
		$('#idtabl').val('');
		$('#idcampft').val('');
		$('#hdm_idvisor').val('');
		var popupload = $('#popupload'),
		idtr = $('#idtr');
		idtr.val(0);					
		
		$.post('sipv2/js/jquery.nubeGestionFile/includes/inc_litsfile.php', {											
			vtp:vtp,
			vtps : vtps,
			vtpy : vtpy,
			cp_s : vcp_s,
			vpath : vpath,
			acciondb : 'lista_file'
			
		}, function(data){
			$('ul.archivo_upload').html(data);
		});
		
		popupload.css({
			'position':'fixed',
			'z-index':'5',
			'top':'15%',
			'left':'18.5%',
			'width' : '50%',
			'height' : '400px',
			'padding' : '20px',
			'background' : '#f7f7f7',
			'border' : '2px solid #dddddd',
			'border-radius' : '8px',
			'-moz-box-shadow' : '1 1 8px 1px #cccccc',
			'-webkit-box-shadow' : '1 1 8px 1px #cccccc',
			'box-shadow' : '1 1 8px 1px #cccccc'
		});
		popupload.removeClass('hidden');		
		bloquearFondoPantallaUpload('IdPantalla')
						
};


function vent_papelera(){
		var idp=$("#hdm_py").val();
		var sip=$("#hdm_tps").val();
		var proy=$("#hdm_tp").val();
		
		$.post('sipv2/js/jquery.nubeGestionFile/includes/inc_reciclaje.php', {											
		acciondb : 'lista_file',
		idp:idp,
		sip:sip,
		proy:proy
		
			
		}, function(data){
			$('ul.lista_reciclaje').html(data);
		});
		var popupload = $('#popupreciclaje'),
		idtr = $('#idtr');
		popupload.css({
			'position':'fixed',
			'z-index':'5',
			'top':'10%',
			'left':'10.5%',
			'width' : '64%',
			'height' : '450px',
			'padding' : '20px',
			'background' : '#f7f7f7',
			'border' : '2px solid #dddddd',
			'border-radius' : '8px',
			'-moz-box-shadow' : '1 1 8px 1px #cccccc',
			'-webkit-box-shadow' : '1 1 8px 1px #cccccc',
			'box-shadow' : '1 1 8px 1px #cccccc'
		});
		popupload.removeClass('hidden');		
		bloquearFondoPantallaUpload('IdPantalla')						
}


</script>
   


</head>
<body>	
	
<div id="usuario_actual">
	
	<div id="datos_usuario">
		<div style="float:right; font-size:12px; color:rgb(153,153,153); cursor:pointer;" id="dv_act_clg"><?php echo $usuarioNB[1];?> 
    			
    			<img src="sipv2/utilitarios/imagenes/desc.png" width="12"> 
    
			    <div id="dv_cnlg" class="hidden" style="ma">
			    	<br>
				    <div class="lg_itm" style="color:rgb(102,102,102);"><?php echo $usuarioNB[1];?></div>
			        <div class="lg_itm item_mail" title="<?php echo $usuarioNB[2];?>"><?php echo $usuarioNB[2];?></div>	
					<div class="lg_itm item_espacio" title="espacio"></div>		        		             
			        <div class="lg_itm bt_sl" style="color:#2895f1;">Salir</div>    	
			        <div class="chat-bubble-arrow-border"></div>
			        <div class="chat-bubble-arrow"></div>
			    </div>   
    		</div>
	</div>
	<div id="logo_proyecta">
		<img src="sipv2/utilitarios/imagenes/logo.png" style="margin-left:120px;">
	</div>

</div>
<section id='formulario' style="margin:5px; width:96%; display: block" >
				<form id="frm_modulos">

<div class="panel_editable <?php echo $vt_c09 .' '. $conf_visual['C09'];?>" id="C09" >
		Gestión de archivos<br><br>

		<div class="control_bandeja">
			<div class='filtro'>				
			Carpeta:<b><?php echo $nom;?>: <b> <span id="despliegue"></span>
			<input type="hidden" id="hdm_nom" value="<?php echo $nom;?>">
            <input type="hidden" id="hdm_tp" value="<?php echo $vtp;?>">
            <input type="hidden" id="hdm_tps" value="<?php echo $tps;?>">
            <input type="hidden" id="hdm_py" value="<?php echo $py;?>">
            <input type="hidden" id="ac" value="<?php echo $ac;?>">
			</div>

			
		</div>

		<?php
			$view_add='';
			$view_cpt='';
			$view_edi='';
			$view_del='';
			$view_lin='';
			$view_upl='';
			
			console.log('cccccc->');
			console.log($ac);
   			if($ac=='A'){}
			
			if($ac=='E'){
				
				$view_cpt='hidden';
							
			}
			if($ac=='V'){
				$view_add='hidden';
				$view_cpt='hidden';
				$view_edi='hidden';
				$view_del='hidden';
				$view_lin='hidden';
				$view_upl='hidden';	
			}
		?>
		<div id="explorador_file">
			<div id="menu_file">
				<ul>
					<li class='folder_add <?=$view_add?>' id='nueva_carpeta' title='nueva carpeta'></li>
					<li class='folder_compartir <?=$view_cpt?>' id='comparte_carpeta' title='compartir carpeta'></li>
					<li class='folder_edita <?=$view_edi?>' id='edita_carpeta' title='Editar carpeta'></li>
                    <li class='folder_delete <?=$view_del?>' id='elimina_carpeta' title='eliminar carpeta'></li>
                    
					<li class='folder_link <?=$view_lin?>' id='link_carpeta' title='link carpeta'></li>
					<li class='upload <?=$view_upl?>' id='upload_archivo' title='subir archivo'></li>
					<li class='upload' id='open_popup_upload_file' title='subir archivo nuevo'></li>
					<li class='folder_papelera'  id='papelera_carpeta' title='Papelera de reciclaje'></li>
				</ul>
			</div>

			<div id="popup" style="display: none;">
			    <div class="content-popup">
			        <div class="close"><a href="#" id="close"><img src="sipv2/utilitarios/imagenes/close.png"/></a></div>
			        <input type="hidden" id="directorio_path" name="zyx" />
			        <div>
			        	<div id="dragandrophandler">Arrastre aqui uno o mas Archivos</div>
						<br><br>
						<div id="status1"></div>
			        </div>
			    </div>
			</div>
			<div id="tree"></div>
			
			
			<div id="file"></div>
		</div>
		<input type="file" id="upload_file" class='hidden'>
	</div>
    
    </form>
    
    
    
    <div id='popupload' class='hidden'>
        <form id='frm_upload'>
       
        <img src="sipv2/utilitarios/imagenes/paper_clip.png" id='adjuntar' title='adjuntar'>
        <img src="sipv2/utilitarios/imagenes/upload.png" id='upload' title='subir'>       
        <img src="sipv2/utilitarios/imagenes/cross.png" id='salir_upload' title='salir' class='float-right pointer'>
      
        <div id='filetmp'>
            <div class='cabecera_archivo'>
                <span class='nombre_archivo'>Nombre Archivo</span>
                <span class='tamano_archivo'>Tamaño</span>
                <span class='estado_archivo'>Estado</span>
            </div>
            <div id="lista_upload" class='lista_upload'>
            </div>
        </div>
        <input type="file" id='file_upload' name="file[]" class='hidden'>
       
         
        <div id='result_file'><ul class='archivo_upload'></ul></div>
        </form>
        <input type="hidden" id="idtr" value="">
        <input type="hidden" id="idtabl" value="">
        <input type="hidden" id="idcampft" value="">
        <input type="hidden" id="hdm_idvisor" value="">
      
    </div>

<div id='popupreciclaje' class='hidden'>
        <img src="sipv2/utilitarios/imagenes/delete.png"  title='Eliminar Definitivamente'> Papelera de Reciclaje 
         <img src="sipv2/utilitarios/imagenes/cross.png" id='salir_papelera' title='salir' class='float-right pointer'/>
        <div id='filetmp'>
            <div id='result_file' style="margin-top:10px">
            <ul class='lista_reciclaje'></ul> 
            </div>
        </div>
    </div> 

    </section>

<br><br>

 
</body>
</html>